<template>
  <r-view class="view-cart">
    <div v-if="isEmpty" class="tips-empty">
      <h4>购物车是空的哦</h4>
      <r-btn border favorite @click="goShopping">去逛逛</r-btn>
    </div>
  </r-view>
</template>
<script>
import RView from 'src/components/r-view'
import RBtn from 'src/components/r-btn'
export default {
  name: 'view-cart',
  components: {
    RView,
    RBtn
  },
  data () {
    return {
      list: []
    }
  },
  computed: {
    isEmpty () {
      return this.list.length === 0
    }
  },
  methods: {
    goShopping () {
      this.$router.push({
        name: 'discover'
      })
    }
  }
}
</script>
<style lang="scss">
  @import "../styles/index";

  .view-cart {
    .tips-empty {
      @extend %flex-center;
      flex-direction: column;
      height: 100%;

      h4 {
        font-weight: normal;
        color: $color-placeholder;
        font-size: 14px;
        margin: 10px 0;
      }
    }
  }
</style>
